package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 企业业务主体配置
 * @author tianyonghong
 */
@Data
@Accessors(chain = true)
@TableName("zdd_company_party")
public class CompanyParty extends Model<CompanyParty> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("企业id")
    @TableField("compid")
    private Integer compid;

    @ApiModelProperty("业务类型编号( 业务:zdd;智众包业务:cro;智零工业务:odd 创客团业务：group)")
    private String businessSn;

    @ApiModelProperty("支付方式id(表zdd_payment)")
    @TableField("pay_id")
    private Integer payId;

    @ApiModelProperty("支付名称(表zdd_payment)")
    @TableField(exist = false)
    private String payName;

    @ApiModelProperty("支付方式名称（企业端展示）(表zdd_payment)")
    @TableField(exist = false)
    private String payNameAlias;

    @ApiModelProperty("支付方式编码 BTL:线下 ZS:招商银行 ZFBB2C:支付宝 ZFBWTJD:支付宝委托接单 PA:平安银行(表zdd_payment)")
    @TableField(exist = false)
    private String payTypeSn;

    @ApiModelProperty("来源表 0:空 1:表zdd_payment_merchant 2:表zdd_maker_alipay_principal")
    @TableField(exist = false)
    private Integer sourceTable;

    @ApiModelProperty("来源表的ID")
    @TableField(exist = false)
    private Integer sourceId;

    @ApiModelProperty("运营主体ID")
    @TableField("party_id")
    private Integer partyId;

    @ApiModelProperty("运营主体名称")
    @TableField(exist = false)
    private String partyName;

    @ApiModelProperty("城市ID")
    private Integer cityId;

    @ApiModelProperty("城市名称")
    @TableField(exist = false)
    private String cityName;

    @ApiModelProperty("是否默认支付方式(0:否，1:是)")
    private Integer isDefault;

    @ApiModelProperty("税源地id")
    @TableField("tax_source_id")
    private Integer taxSourceId;

    @ApiModelProperty("税源地名称")
    @TableField(exist = false)
    private String taxSourceName;

    @ApiModelProperty("创建时间")
    @TableField("created_time")
    private Date createdTime;

    @ApiModelProperty("修改时间")
    @TableField("updated_time")
    private Date updatedTime;

    @ApiModelProperty("逻辑删除 0：正常 1：已删除")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "企业余额")
    @TableField(exist = false)
    private BigDecimal balance;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
